package rs.networx.util;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class PropertiesUtil {


	public static String getProperty(String propertyFile, String propertyName){

		try {
			Properties props = new Properties();

			//try retrieve data from file

			props.load(new FileInputStream(propertyFile));

			String value = props.getProperty(propertyName);
			return value;
			
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}
}
